﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AdaptiveDeNet.CSV
{
    public class Result
    {
        private int evals;

        public int FuncEvals
        {
            get { return evals; }
            set { evals = value; }
        }

        private double fmin;

        public double Fmin
        {
            get { return fmin; }
            set { fmin = value; }
        }

        private double elapsed;

        public double Elapsed
        {
            get { return elapsed; }
            set { elapsed = value; }
        }

        private double fminDIff;

        public double FminDiff
        {
            get { return fminDIff; }
            set { fminDIff = value; }
        }

        private double[] point;

        public double[] Point
        {
            get { return point; }
            set { point = value; }
        }
        

        public string CSVresult(double rel)
        {
            int reliability = 0;

            if (fmin < 0.0001)
	        {
		        reliability = 1;
	        }

            return evals + ";" + reliability + ";" + elapsed + ";" + fmin;
        }



        public override string ToString()
        {
            return "fevals: " + evals + "R: " + fmin;
        }

    }
}
